package cn.com.cfae.iras.doc.analyze.parse.model;

import cn.com.cfae.iras.doc.analyze.parse.kv.TextLayout;

/**
 * 命中的表格页面定位
 */
public class PageArea {

    private int pageNumber;
    private double top;
    private double left;
    private double width;
    private double height;


    public PageArea(int pageNumber, double top, double left, double height, double width) {
        this.pageNumber = pageNumber;
        this.top = top;
        this.left = left;
        this.width = width;
        this.height = height;
    }

    public PageArea(double top, double left, double height, double width) {
        this(-1, top, left, height, width);
    }

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public double getTop() {
        return top;
    }

    public void setTop(double top) {
        this.top = top;
    }

    public double getLeft() {
        return left;
    }

    public void setLeft(double left) {
        this.left = left;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getLayout() {
        StringBuilder layout = new StringBuilder();
        return layout.append(getTop()).append(",").append(getLeft()).append(",").append(getHeight()).append(",").append(getWidth()).toString();
    }
}
